//
//  NBLVersion.m
//  NBLiOSTools
//
//  Created by GangX-yangjh on 2021/12/5.
//

#import "NBLVersion.h"

@implementation NBLVersion

+ (NSString *)appVersion
{
    return [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
}

+ (BOOL)needUpdate:(NSString *)lastestVersion
{
    NSComparisonResult result = [[NBLVersion appVersion] compare:lastestVersion options:NSNumericSearch];
    // 后者大则需要升级
    return result == NSOrderedAscending;
}

@end
